package com.jimmyhsu.ecnudaowei.coursetable.file;

/**
 * Created by jimmyhsu on 2017/5/9.
 */

public class SharedFile {

    public static final String TABLE_NAME = "sharedfile";
    public static final String COL_COURSE_ID = "course_id";
    public static final String COL_URL = "url";
    public static final String COL_TITLE = "title";
    public static final String COL_SIZE = "size";
    public static final String COL_AUTHOR = "author";
    public static final String COL_TIME = "time";
    public static final String COL_TYPE = "type";
    public static final String COL_DOWNLOADED = "downloaded";

    private String type;
    private String name;
    private int size;
    private String publisher;
    private long releaseTime;
    private String url;
    private boolean downloaded;

    public SharedFile(String type, String name, int size, String publisher, long releaseTime, String url) {
        this.type = type;
        this.name = name;
        this.size = size;
        this.publisher = publisher;
        this.releaseTime = releaseTime;
        this.url = url;
        this.downloaded = false;
    }

    public boolean isDownloaded() {
        return downloaded;
    }

    public void setDownloaded(boolean downloaded) {
        this.downloaded = downloaded;
    }

    public SharedFile(String type, String name, int size, String publisher, long releaseTime, String url,
                      int downloaded) {
        this.type = type;
        this.name = name;
        this.size = size;
        this.publisher = publisher;
        this.releaseTime = releaseTime;
        this.url = url;
        this.downloaded = downloaded > 0;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public long getReleaseTime() {
        return releaseTime;
    }

    public void setReleaseTime(long releaseTime) {
        this.releaseTime = releaseTime;
    }
}
